Repository navigation
Conversation
…in view Every table of a view's items is one TanStack table with a pager under it; the page and size live in the URL query, per table. The worker cards page at 24, Busiest workers shows the top five. The events feed scrolls in a fixed box, drawn with TanStack Virtual, keeps the reader's row in place while scrolled down, counts new events in a button, and holds the newest 10,000. A select draws its own chevron in CSS. Closes #299
…efreshes DataTable drew each cell with TanStack's FlexRender, which mounts a cell function as a component. The columns are built anew on every render, so every one-second refresh mounted a new component in every cell, drew its elements afresh, and took focus off a row's link. The table now calls each column's cell function itself. A new test focuses a row's link, waits for two refreshes, and checks the same element still has focus, the rows kept their order, and Enter opens the lease.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #299
Every table of a view's items is now one
DataTableon@tanstack/react-table, with a pager under it. Pages hold 25, 50 or 100 rows. The page and size live in the URL, under each table's own key (?devices-page=2&leases-page=3). When a refresh shrinks the list, the view moves to the last page; when everything fits on one page, the pager is hidden. Attention is now that table too. Worker cards page at 24, and Busiest workers shows five and links to the cards. Leases are sorted by grant time, so a refresh never moves a row to another page.The events feed scrolls in a fixed box drawn with
@tanstack/react-virtual. While the reader is scrolled down, new events leave the visible row where it is, and an "N new events" button counts them. The feed keeps 10,000 events. There is no<style>element, and de-duplication is unchanged. The pager's select draws its own CSS chevron, with no image, so the CSP is untouched. It was checked in screenshots in all three browsers, light and dark.Seeding.
e2e/console/long-lists.spec.tsstarts a fake-driver host with iOS limits of 400. Over the socket it usessimlock/clientto take 300 leases, one requester each. It then renews them untilGET /v1/events?since=1hholds 5,000 events. The paging tests usepage.routeto serve made-up lists for one route, on top of the real daemon's answer.Done when
long-lists.spec.tspass in all three browsers.pnpm test:console, 258 passed.Review
Spec review: 17 findings over 2 rounds, 3 fixed. Code review: 17 findings over 2 rounds, 13 fixed.
Rejected:
GET /v1/leasesis not promised. The sort uses only facts a lease keeps for its whole life.setPageSizebehaviour, and the alternative of jumping to page 1 loses the reader's place.ARCHITECTURE.mdis not a listed module — the docs rule says a change updates the docs it makes true.usePagingpage, and every move goes through one place,Pager.FlexRendermounted the per-render cell function as a new component, so a focused row link lost focus (the flaky WebKit keyboard test). The table now calls each cell function itself; a new test keeps a focused link focused across two refreshes.Written by an agent.